package com.dengdai.applibrary.view.dialog;

import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.TextView;

import com.dengdai.applibrary.R;

/**
 * @说明 自定义加载对话框
 * @作者 LY
 * @时间 2016/1/5 9:02
 * @版权 Copyright(c) 2016 LY-版权所有
 */
public class CustomProgressView extends ProgressDialog {
    private TextView tv_load;
    private String msg;

    public CustomProgressView(Context context, int theme , String msg) {
        super(context, theme);
        this.msg = msg;
    }

    public CustomProgressView(Context context, String msg) {
        super(context);
        this.msg = msg;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.common_custom_progress);
        tv_load = (TextView) findViewById(R.id.tv_load);
        if (!TextUtils.isEmpty(msg))
            tv_load.setText(msg);
    }
}
